package com.zqq.goods.service.api

import com.zqq.baselibrary.http.rx.BaseResp
import com.zqq.goods.service.bean.GetGoodsDetailReq
import com.zqq.goods.service.bean.GetGoodsListByKeywordReq
import com.zqq.goods.service.bean.GetGoodsListReq
import com.zqq.goods.service.bean.Goods
import retrofit2.http.Body
import retrofit2.http.POST
import rx.Observable

/**
 * 商品接口
 * wc
 * @author zqq on 2019/5/28.
 */
interface GoodsApi {

    /**
     * 获取商品列表
     */
    @POST("goods/getGoodsList")
    fun getGoodsList(@Body req: GetGoodsListReq): Observable<BaseResp<MutableList<Goods>?>>

    /**
     * 获取商品列表
     */
    @POST("goods/getGoodsListByKeyword")
    fun getGoodsListByKeyword(@Body req: GetGoodsListByKeywordReq): Observable<BaseResp<MutableList<Goods>?>>

    /**
     * 获取商品详情
     */
    @POST("goods/getGoodsDetail")
    fun getGoodsDetail(@Body req: GetGoodsDetailReq): Observable<BaseResp<Goods>>


}